<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="@{/}">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<th:block th:include ="commHeaderInclude::commHead"></th:block>
<title>录入放款信息</title>
</head>
<body class="ht">
<th:block th:include="commHeaderInclude::loading"></th:block>
	<div class="content-wrapper">
		<div class="alert alert-warning"><i class=" mdi mdi-alert-circle" style="font-size: 16px; font-weight: bold;"></i><span style="font-size: 16px; font-weight: bold;">请再次确认放款信息的准确性，提交后不可修改，如关键信息有误，需要经办行申请撤销放款信息并重新提交（官网首页-下载中心《中征医保贷（医惠贷）业务放款信息撤销申请表》，加盖经办行公章）。</span></div>
		<form name="form" id="form" class="form" method="post" th:object="${result.data}" onsubmit="ht.loading.open()">
			<input type="hidden" name="financeId" th:value="*{financeId}"/>
			<input type="hidden" name="token" th:value="${session.token}">
			<input type="hidden" name="action" value="create" />
			<div class="card mb-3">
				<div class="card-body">
					<div class="module">
						<table cellpadding="0" cellspacing="0" class="vTable">
							<tbody>
								<tr>
									<th>医保定点机构</th>
									<td th:text="*{@util.fStr(miOrgName)}">医保定点机构</td>
								</tr>
                                <tr>
                                    <th><span class="required">*</span>授信合同名称</th>
                                    <td><span th:text="*{@util.fStr(contractName)}">授信合同名称</span><input type="hidden" name="contractName" th:value="*{@util.fStr(contractName)}"/></td>
                                </tr>
								<tr>
									<th><span class="required">*</span>授信合同编号</th>
									<td><span th:text="*{@util.fStr(contractCode)}">授信合同编号</span><input type="hidden" name="contractCode" th:value="*{@util.fStr(contractCode)}"/></td>
								</tr>
								<tr>
									<th><span class="required">*</span>币种</th>
									<td><span>人民币元</span><input type="hidden" name="contractCurrency" th:value="*{contractCurrency}"/></td>
								</tr>
								<tr>
									<th><span class="required">*</span>授信金额</th>
									<td><span th:text="*{contractAmount}">授信金额</span>元<input type="hidden" name="contractAmount" th:value="*{contractAmount}"/></td>
								</tr>
								<tr>
									<th><span class="required">*</span>放款时间</th>
									<td><span th:text="*{#dates.format(loanStartTime,'yyyy-MM-dd')}">放款时间</span><input type="hidden" name="loanStartTime" th:value="*{#dates.format(loanStartTime,'yyyy-MM-dd')}"/></td>
								</tr>
								<tr>
									<th><span class="required">*</span>放款金额</th>
									<td><span th:text="*{loanAmount}">放款金额</span>元<input type="hidden" name="loanAmount" th:value="*{loanAmount}"/></td>
								</tr>
                                <tr>
                                    <th>利率</th>
                                    <td><span th:text="*{loanRate!=null ? loanRate+'%/年' : ''}">利率</span><input type="hidden" name="loanRate" th:value="*{loanRate}"/></td>
                                </tr>
                                <tr>
                                    <th><span class="required">*</span>到期时间</th>
                                    <td><span th:text="*{#dates.format(loanEndTime,'yyyy-MM-dd')}">到期时间</span><input type="hidden" name="loanEndTime" th:value="*{#dates.format(loanEndTime,'yyyy-MM-dd')}"/></td>
                                </tr>
								<tr>
									<th><span class="required">*</span>普惠业务</th>
									<td><span th:text="${application.DictMap.PHYWType[result.data.puhuiFlag]}">普惠业务</span><input type="hidden" name="puhuiFlag" th:value="*{puhuiFlag}"/></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>

			<div class="row">
				<input class="btn btn-primary btn-lg" type="submit" value="确认无误" />
				<!--<input class="btn btn-secondary btn-lg" type="button" value="取 消" onclick="parent.ht.closeAllFrameWindow()" />-->
				<input class="btn btn-secondary btn-lg" type="submit" value="取 消" onclick="$('[name=action]').val('form');" />
			</div>
		</form>
	</div>
</body>
<script>
function setProductById(id){
    loadProductById(id);
}
function loadProductById(id){
    var options={
        url:"/mcp/hos/finance/productDetail/?id="+id,
        success(res){
            //console.log(res);
            $("[name=productId]").val(id);
            ht.closeAllFrameWindow()
        },
        fail(err){
            //console.log(err)
        }
    };
    $.ajax(options)
}
</script>
</html>